<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>AdminLTE | Data Tables</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="<%=basePath%>bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="<%=basePath%>bootstrap/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="<%=basePath%>bootstrap/css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- DATA TABLES -->
        <link href="<%=basePath%>bootstrap//datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="<%=basePath%>bootstrap/css/AdminLTE.css" rel="stylesheet" type="text/css" />

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body class="skin-blue">
  <%@include file="../header.jsp"%> <!--静态包含-->
  <%@include file="../left.jsp"%> <!--静态包含-->

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Data Tables
                        <small>advanced tables</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                        <li><a href="#">Tables</a></li>
                        <li class="active">Data tables</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-xs-12">

                            
                            <div class="box">
                                <div class="box-header">
                                    
                                    <form action="<%=basePath%>/user/userlist.action" id="regForm">
姓名:<input class="tablesrk" id="sse.enterpriseName" value="${page.param.pageName}" type="text" name="pageName" placeholder="请输入">
	       
	<input class="tablesrk" id="pageNowid" value="${page.pageNow}" type="hidden" name="pageNow" >
	   
	   
  <input class="btn_blue w90" type="button"  value="搜索" onclick="jump(1)">
</form>
                                </div><!-- /.box-header -->
                                <div class="box-body table-responsive">
                                    <table id="example1" class="table table-bordered table-striped">
                                        <thead>
                                            <tr>
                                                <th>用户编号</th>
                                                <th>用户名</th>
                                                <th>密码</th>
                                                <th>部门</th>
                                                <th>工作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        
                                        <c:forEach items="${page.list}" var="user1">
                                        
                                        
                                        <tr>
                                                <td>${user1.user_name}</td>
                                                <td>${user1.user_name}</td>
                                                <td>${user1.user_name}</td>
                                                <td> ${user1.user_name}</td>
                                                <td>${user1.user_name}</td>
                                            </tr>
							</c:forEach>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div id="liwd">
                    									<font size="2">共${page.totalPageCount}页&nbsp;</font> <font
												size="2">第${page.pageNow } 页 &nbsp;</font> 
												<a href="javascript:void(0)" onclick="jump(1)">首页&nbsp;</a>
											<c:choose>
												<c:when test="${page.pageNow-1>0}">
													<a href="javascript:void(0)" onclick="jump(${page.pageNow-1})">上一页</a>
												</c:when>
												<c:when test="${page.pageNow-1<=0}">
													<a  href="javascript:void(0)" onclick="jump(${page.pageNow-1})">上一页</a>
												</c:when>

											</c:choose>
											<c:choose>
												<c:when test="${page.totalPageCount==0} }">
													<a href="javascript:void(0)" onclick="jump(${page.pageNow+1})">下一页</a>
												</c:when>
												<c:when test="${page.pageNow+1<=page.totalPageCount}">
													<a href="javascript:void(0)" onclick="jump(${page.pageNow+1})">下一页</a>
												</c:when>
												<c:when test="${page.pageNow+1>page.totalPageCount}">
													<a href="javascript:void(0)" onclick="jump(${page.pageNow+1})">下一页</a>
												</c:when>
											</c:choose>
											<c:choose>
												<c:when test="${page.totalPageCount==0}">
													<a href="javascript:void(0)" onclick="jump(${page.totalPageCount})">尾页</a>
												</c:when>
												<c:otherwise>
													<a href="javascript:void(0)" onclick="jump(${page.totalPageCount})">尾页</a>
												</c:otherwise>
											</c:choose>
											<select id="selectObj" onchange="jump1(this)">
													<c:forEach var="num" begin="1" end="${page.totalPageCount}">
														<OPTION value="${num}" ${page.pageNow==num?'selected':''}>第${num}页</OPTION>
													</c:forEach>
												</select>
                    
                    </div>
                    

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->


        <!-- jQuery 2.0.2 -->
        <script src="<%=basePath%>bootstrap/js/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="<%=basePath%>bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <!-- DATA TABES SCRIPT -->
        <script src="<%=basePath%>bootstrap/js/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
        <script src="<%=basePath%>bootstrap/js/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="<%=basePath%>bootstrap/js/AdminLTE/app.js" type="text/javascript"></script>

        <!-- page script -->
        <script type="text/javascript">
            function jump1(selectObj) {
				 $("#pageNowid").val(selectObj.value);
				$("#regForm").submit(); 
                                   }
             function jump(selectObj) {
	                $("#pageNowid").val(selectObj);
	                $("#regForm").submit();
}
        </script>

    </body>
</html>